fix: input in create link button popover closing keyboard - #2982
Draft
matthewlipski wants to merge 48 commits into
Draft
fix: input in create link button popover closing keyboard#2982matthewlipski wants to merge 48 commits into
matthewlipski wants to merge 48 commits into
Conversation
- Made mobile toolbar no longer experimental & part of default UI - Updated example
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
- Removed hover styles for mobile - Gated comment and link buttons to only show when selection is not empty
…p or mobile version should be used
…with external keyboard
…ple (#2985) * docs: name the mobile toolbar layouts, add layout toggle to example Introduce "scrolling document" (default) vs "pinned scroll container" (opt-in) as the names for the two page layouts the mobile formatting toolbar supports, and restructure the docs section around them. - Docs: simple-first rewrite of the Mobile Formatting Toolbar section (default layout, then the opt-in layout with its two CSS rules). - Example: stop embedding it in the docs (`docs: false`) - its page-level CSS (html/body overflow, full-viewport fixed scroll host, `.prose` rules) leaks into the docs page since examples render inline. Link to the standalone playground example instead. - Example: add a nav-bar switch that toggles the pinned scroll container layout via a class on <html>, so both layouts can be compared. - Playground: `.mantine-AppShell-root` width 100vw -> 100%, which caused a horizontal scrollbar on any example taller than the viewport. - Align README, JSDoc and example comments with the new naming; regenerate examples.gen.tsx. * Implemented PR feedback --------- Co-authored-by: Matthew Lipski <matthewlipski@gmail.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where tapping the create link button in the formatting toolbar on Android Chrome closes the virtual keyboard as well as the toolbar. The reason this happens is that tapping the button opens a popover, which immediately gets autofocused. Chrome on Android bugs out when there's not a certain amount of space below an input in a popover, making the virtual keyboard open and immediately dismiss when tapping the input, or focusing it in any other way:
1000001130.mov
This is fixed in the PR by calling
scrollIntoViewon the input just before the focus moves to it. However, it messes up the scroll position in the document. I've tried resetting the scroll position back to the selection usingscrollToandtransaction.scrollIntoViewin a timeout, but couldn't get this working.The issue is reproducible on BrowserStack - you should be able to compare the previews of this PR and #2939 side-by-side.
Rationale
Changes
Impact
Testing
Screenshots/Video
Checklist
Additional Notes